package com.mvc.service;


import com.mvc.annotion.Resource;
import com.mvc.annotion.Service;
import com.mvc.annotion.Transactional;
import com.mvc.dao.AccountDao;

@Service("goodsService")
public class GoodsServiceImpl implements GoodsService{
    @Resource
    private AccountDao accountDao;

    @Override
    public String findGoodsList(){
        System.out.println("come in......");
        return "spring 事务处理 ok....";
    }

    @Transactional
    @Override
    public String insert(String name) throws Exception{
        accountDao.insert(name);
//        int a=1/0;
        return "spring 事务处理 ok....";
    }
}
